package org.example;

public class TextBook extends Book{
    private String subject;
    private int gradelevel;

    public TextBook(String author, String title, String subject,int gradelevel) {
        super(author, title);
        this.subject = subject;
        this.gradelevel=gradelevel;
    }

    public String getSubject() {
        return subject;
    }

    public int getGradelevel() {
        return gradelevel;
    }

    @Override
    public String toString() {
        return "TextBook{" +
                "subject='" + subject + '\'' +
                ", gradelevel=" + gradelevel +
                '}';
    }
}
